﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class BusinessGroupFacade
    {
        public string Save(BusinessGroup BusinessGroups)
        {
            BusinessGroupController cont = new BusinessGroupController();
            return cont.Save(BusinessGroups);
        }

        public string Delete(BusinessGroup BusinessGroups)
        {
            BusinessGroupController cont = new BusinessGroupController();
            return cont.Delete(BusinessGroups);
        }

        public string BeforeDelete(BusinessGroup BusinessGroups)
        {
            BusinessGroupController cont = new BusinessGroupController();
            return cont.BeforeDelete(BusinessGroups);
        }

        public IList<BusinessGroup> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<BusinessGroup> BusinessGroups = new List<BusinessGroup>();
            BusinessGroupController cont = new BusinessGroupController();
            BusinessGroups = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return BusinessGroups;
        }

        public BusinessGroup GetBusinessGroupByID(int ID)
        {
            BusinessGroup BusinessGroups = new BusinessGroup();
            BusinessGroupController cont = new BusinessGroupController();
            BusinessGroups = cont.GetBusinessGroupByID(ID);
            return BusinessGroups;
        }
    }
}